
filename = '../../inputs/consultas-30'
f = file(filename, "r")
lines = f.readlines()

count = 0
for line in lines:
  outfile = open('result_' + str(count) + '.gp', 'w')
  outfile.write("""reset
set term postscript eps 24 enhanced color
set encoding iso_8859_1
set key right top
#set format x "10^{%L}"
#set format y "10^{%L}"
set xlabel "Recall"
set ylabel "Precision"
#set xrange [:]
#set yrange [0.001:]
set title "Recall x Precision: \\\"""" + line.rstrip() + """\\\""
#set log x
#set log y
set xtics 10
set output "result_""" + str(count) + """.eps"
plot[][] "../results/result_""" + str(count) + """_v" using 1:2 title 'Modelo Vetorial' with linespoint linestyle 7 linewidth 3 pointsize 1.5, \
"../results/result_""" + str(count) + """_c" using 1:2 title 'Modelo Combinado' with linespoint linestyle 4 linecolor 1 linewidth 3 pointsize 1.5, \
"../results/result_""" + str(count) + """_b" using 1:2 title 'BM25' with linespoint linestyle 3 linewidth 3 pointsize 1.5
""")
  print line
  outfile.close()
  count += 1

f.close()
